import { PAGING } from '@/constant'
// import { Vue3TreeOrg } from 'vue3-tree-org';

export const defaultFormData: any = {
  name: '',
  departmentId: null,
}

export const formRules = {
  name: [
    {
      required: true,
      message: '名称不能为空！',
      trigger: 'blur',
    },
  ],
  departmentId: [
    {
      required: true,
      message: '部门不能为空！',
      trigger: 'blur',
    },
  ],
}

export const defaultPagingParams: any = {
  ...PAGING.PARAMS,
  name: '',
}

export const treeOrgConfig = {
  horizontal: false,
  collapsable: true,
  onlyOneNode: true,
  cloneNodeDrag: true,
  toolBar: true,
  scalable: true,
  nodeDraggable: true,
  defaultExpandLevel: 2,
  center: true,
  defineMenus: [],
  style: {
    background: '#fff',
    color: '#5e6d82',
  },
  data: [
    { id: 1, parentId: 0, departName: '123456', children: null },
    { id: 2, parentId: 0, departName: 'fasdfa', children: null },
    {
      id: 3,
      parentId: 0,
      departName: '江西',
      children: [
        {
          id: 8,
          parentId: 3,
          departName: 'dafsdfa',
          children: [
            {
              id: 9,
              parentId: 8,
              departName: 'fasdfasdfasdfasdfasdf',
              children: null,
            },
          ],
        },
      ],
    },
    { id: 4, parentId: 0, departName: '的说法', children: null },
  ],
  props: {
    label: 'departName',
    pid: 'parentId',
  },
}
